package ioc

import (
	"shop_srvs/inventory_srv/global"
	"shop_srvs/inventory_srv/utils/mq"
)

func InitRabbitMQ() {
	var err error
	global.RabbitMQ, err = mq.NewRabbitMQRouting("reback_order.queue", "reback_order.exchange",
		"reback_order")
	if err != nil {
		panic(err)
	}
	if err := global.RabbitMQ.InitExchange(); err != nil {
		panic(err)
	}
}
